package cn.parllay.dingdangproject.activity;

import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;

import cn.parllay.dingdangproject.R;
import cn.parllay.dingdangproject.utils.StatusBarCompat;


/**
 * Created by sunny on 2018/1/18.
 */

public abstract class BaseActivity extends AppCompatActivity {


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);


        //设置竖屏
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

        //设置沉浸式状态栏
        StatusBarCompat.compat(this, getResources().getColor(R.color.blue1));

        //注册事件总线
//        EventBus.getDefault().register(this);


    }


    //获取布局id
//    protected abstract int getContentViewId();

    @Override
    protected void onDestroy() {
        super.onDestroy();
        //取消注册事件总线
//        EventBus.getDefault().unregister(this);

    }


}
